#include "enterPlayRecordMessage.h"
#include <rapidjson/document.h>
#include "jsonUtils.h"

EnterPlayRecordMessage::EnterPlayRecordMessage(MtpProtocol* packet) : MtpMessage(packet)
{

}

EnterPlayRecordMessage::EnterPlayRecordMessage(const int64_t& id, const int64_t& dmId) : MtpMessage(new MtpProtocol(L"enterPlayRecord")),param(id,dmId,0)
{
}

void EnterPlayRecordMessage::decodeBody()
{
	MtpMessage::decodeBody();
	param.fromJson(jsonContent);
}

void EnterPlayRecordMessage::encodeBody()
{
	jsonContent = param.jsonStr();
	MtpMessage::encodeBody();
}

const int64_t& EnterPlayRecordMessage::getId() const
{
	return param.getId();
}

const int64_t& EnterPlayRecordMessage::getDmId() const
{
	return param.getDmId();
}
